<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title> 我的 OpenID - LooPo-乐铺 </title>
<?php include VIEWS.'header.html'?>

<style type="text/css">
#openid_div {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

#openid {
    display: inline;
}

#openid legend {
    font-weight: bold;
    color: #FF6200;
    padding-left: 10px;
    padding-right: 10px;
}

#openid form {
    padding: 1em;
}

#openid .openid_login {
    background: url(/images/openid/openid.gif) no-repeat;
    background-position: 0 50%;
    color: #000;
    padding-left: 18px;
    width: 310px;
    margin-right: 10px;
    font-size: 14px;
}

#whatsopenid {
    margin-left: 10px;
}

.tt{
    width: 96%;
    padding: 0;
}

.tt td{
    border-bottom: 1px dotted #CCCCCC;
    font-size: 12px;
}

.ti {
    line-height: 150%;
}
</style>
</head>

<body>
<?php include VIEWS.'topbar.html'?>

<div id="content">

<?php include VIEWS.'leftnav.html'?>

<div id="right">

<h1>我的 OpenID</h1>

<?php if ($code['openid'] & 1):?><div class="goodbox roundNormal">&nbsp;&nbsp;&nbsp;OpenID 已绑定: <?php echo $msg?></div><?php endif;?>
<?php if ($code['openid'] & 2):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;您输入的 OpenID 不正确，请重试……</div><?php endif;?>
<?php if ($code['openid'] & 4):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;您中止了 OpenID 绑定过程</div><?php endif;?>
<?php if ($code['openid'] & 8):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;绑定过程中发生异常 (<?php echo $msg?>)，请联系您的 OpenID 提供商</div><?php endif;?>
<?php if ($code['openid'] & 16):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;发生错误: <?php echo $msg?></div><?php endif;?>
<?php if ($code['remove'] & 2):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;解除绑定错误: 您至少需要保留一个 OpenID 以供登录</div><?php endif;?>
<br clear="all">

<div id="openid_div">
    <fieldset id="openid">
    <legend>绑定新的 OpenID</legend>
        <form action="/openid.php" method="post">
        <input type="hidden" name="openid_action" value="login">
        <div><input type="text" name="openid_url" class="openid_login" value="http://"><input class="bluebtn" type="submit" value="绑&nbsp;定" name="Submit" style="font-weight:bold;" tabindex="1" /></div>
        </form>
    </fieldset>
    <div><img align="absmiddle" src="/images/openid/google.gif" /> <a href="/openid?openid_action=login&amp;openid_url=https://www.google.com/accounts/o8/id" class="px12">绑定你的 Google 帐号</a></div>
    <div><img align="absmiddle" src="/images/openid/yahoo.gif" /> <a href="/openid?openid_action=login&amp;openid_url=https://me.yahoo.com" class="px12">绑定你的 Yahoo! 帐号</a></div>

</div>

<hr size="1" style="margin:30px 10px" />

<div id="whatsopenid">
<h3>&raquo; 当前已绑定的 OpenID</h3>
    <div id="list" style="margin:auto">
        <?php if(count($list['openid'])):?>
        <?php echo round_table('96%', '244890', 'white', 2, 2, 'top')?>
        <table class="tt" cellspacing="0">
            <tr class="ti" style="font-weight:bold;background-color:#244890;color:#FFF"><td>&nbsp;</td><td>&nbsp;&nbsp;OpenID 地址</td><td nowrap="nowrap">操作</td></tr>
        <?php foreach ($list['openid'] as $v):$i++;?>
        <tr class="ti"><td><?php echo $i?></td><td>&nbsp; <a href="<?php echo $v?>"> <?php echo $v?> </a></td><td><a href="/openid?remove=1&amp;url=<?php echo urlencode($v)?>">解除绑定</a></td></tr>
        <?php endforeach?>
        </table>

        <?php if($page['next']):?><div style="text-align:right;margin:0.8em"><a class="px12" tabindex="3" href="<?php echo $page['url']?>p=<?php echo $page['next']?>">更旧的话题</a></div><?php endif?>

        <?php else:?>
        <div class="goodbox roundNormal">&nbsp;&nbsp;&nbsp;暂时没有绑定任何 OpenID, 想了解 OpenID 吗？请 <a href="/openid?faq">点击这里</a></div>
        <?php endif?>
</div>

    </div>
</div>

<?php include VIEWS.'copyright.html'?>

</body>
</html>
